package com.deng.common.dao.impl;

import java.sql.Connection;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;

import com.deng.common.SQLHelper;
import com.deng.common.dao.IFeeType;
import com.deng.common.vo.FeeTypeVo;

public class FeeTypeImpl extends SQLHelper implements IFeeType {

	public List<FeeTypeVo> getFeeType() {
		try
		{
			Connection conn = getConnect();
			String sql = "select id,name " +
					" from dbo.DICT_FEE_TYPE order by name";
			ResultSet rs = queryData(conn, sql);
			List<FeeTypeVo> l = new ArrayList<FeeTypeVo>();
			FeeTypeVo vo;
			while(rs.next())
			{
				vo = new FeeTypeVo();
				vo.id = rs.getString("id");
				vo.name = rs.getString("name");
				l.add(vo);
			}
			return l;
		}
		catch(Exception ex)
		{
			ex.printStackTrace();
		}
		return null;
	}

}
